package com.t18;

import java.io.*;

/**
 * Created by xuyiwei on 2018/9/1.
 */
public class BufferedInputFile {
    public static String read(String fileName) throws IOException {
        File file = new File(fileName);
        BufferedReader br = new BufferedReader(new FileReader(file));
        String s ;
        StringBuilder sb = new StringBuilder();
        while((s=br.readLine())!=null){
            sb.append(s+"\n");
        }
        br.close();
        return sb.toString();
    }
}
